Vegetation Index · Soil-adjusted

OSAVI – Optimized Soil Adjusted Vegetation Index

OSAVI is a soil-adjusted vegetation index optimized for areas with low to medium vegetation cover, reducing the influence of bright soil background compared to NDVI by adding a small constant in the denominator.

1. Scientific Definition

The Optimized Soil Adjusted Vegetation Index (OSAVI) is a spectral vegetation index designed to minimize the effect of soil background in areas with sparse or moderate vegetation cover. It uses Near-InfraRed (NIR) and Red reflectance and adds a small constant in the denominator to compensate for soil brightness.

Formula

A common formulation of OSAVI is:

OSAVI = (NIR − Red) / (NIR + Red + 0.16) Dimensionless (–1 to +1)

Where:

  • NIR: Near-InfraRed reflectance
  • Red: Red band reflectance
  • 0.16: soil adjustment constant (optimized from SAVI)

Typical Interpretation

OSAVI Range Interpretation
< 0.0 Water, clouds, snow, non-vegetated bright surfaces
0.0 – 0.2 Bare soil, rocks, built-up, or very sparse vegetation
0.2 – 0.4 Low to moderate vegetation cover
> 0.4 Dense and healthy vegetation (crops, forests, orchards)

Key Applications

  • Vegetation monitoring in arid and semi-arid regions with strong soil background
  • Crop condition assessment at early to mid growth stages
  • Rangeland and grassland monitoring
  • Complementing NDVI where soil effects are significant

2. Data & Bands for OSAVI

Common Sensors & Bands

  • Sentinel-2 (ESA) – 10 m
    • Red: B4 (~665 nm)
    • NIR: B8 (~842 nm)
  • Landsat 8/9 OLI – 30 m
    • Red: B4
    • NIR: B5

Good Practice

  • Use atmospherically corrected surface reflectance products (SR collections).
  • Filter out cloudy and hazy scenes using cloud masks or cloud percentage metadata.
  • Clip OSAVI raster to your Area of Interest (AOI) before exporting.
  • Use similar acquisition dates when comparing OSAVI time series or multi-year studies.

Palette Suggestion

A sample OSAVI color palette: [ "#440154", "#3b528b", "#21908c", "#5dc963", "#fde725" ]

3. Google Earth Engine Code – OSAVI for Any AOI

Steps: open code.earthengine.google.com → New Script → paste the code → draw your AOI as geometry on the map → click Run. Then export OSAVI as GeoTIFF to Google Drive.

// OSAVI for any Area of Interest (AOI) using Sentinel-2 SR
// --------------------------------------------------------
// 1) Go to: https://code.earthengine.google.com
// 2) Click "New Script" and paste this code.
// 3) On the map: draw your AOI (Polygon/Rectangle).
//    It will appear as a variable named 'geometry' in the left panel.
// 4) Click "Run" to display OSAVI.
// 5) In the Tasks tab, click "Run" to export OSAVI to Google Drive.

// --------------------------------------------------------
// 1. Define Area of Interest (AOI)
// --------------------------------------------------------
var roi = geometry;  // Make sure a 'geometry' object exists in the left panel

// Center the map on the AOI
Map.centerObject(roi, 11);

// --------------------------------------------------------
// 2. Define time range
// --------------------------------------------------------
var startDate = '2023-01-01';
var endDate   = '2023-12-31';

// --------------------------------------------------------
// 3. Load Sentinel-2 Surface Reflectance collection
//    and keep only bands needed for OSAVI
// --------------------------------------------------------
var s2 = ee.ImageCollection('COPERNICUS/S2_SR')
  .filterBounds(roi)
  .filterDate(startDate, endDate)
  .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
  .select(['B4', 'B8']);  // Red, NIR

// Create a median composite and clip to AOI
var image = s2.median().clip(roi);

// --------------------------------------------------------
// 4. Compute OSAVI
// OSAVI = (NIR - RED) / (NIR + RED + 0.16)
// --------------------------------------------------------
var osavi = image.expression(
  '(NIR - RED) / (NIR + RED + 0.16)',
  {
    'NIR': image.select('B8'),
    'RED': image.select('B4')
  }
).rename('OSAVI');

// --------------------------------------------------------
// 5. Visualization on the map
// --------------------------------------------------------
var osaviVis = {
  min: -1,
  max: 1,
  palette: [
    '#440154', // low
    '#3b528b',
    '#21908c',
    '#5dc963',
    '#fde725'  // high
  ]
};

// Add OSAVI layer to the map
Map.addLayer(osavi, osaviVis, 'OSAVI (Sentinel-2)', true);

// Optionally, also show a true color composite for context
var s2_rgb = ee.ImageCollection('COPERNICUS/S2_SR')
  .filterBounds(roi)
  .filterDate(startDate, endDate)
  .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
  .select(['B4','B3','B2'])  // RGB
  .median()
  .clip(roi);

Map.addLayer(s2_rgb, {min:0, max:3000}, 'True Color (RGB)', false);

// --------------------------------------------------------
// 6. Export OSAVI as GeoTIFF to Google Drive
// --------------------------------------------------------
Export.image.toDrive({
  image: osavi,
  description: 'OSAVI_Export',
  fileNamePrefix: 'OSAVI_Export',
  region: roi,
  scale: 10,       // Sentinel-2 resolution
  crs: 'EPSG:4326',
  maxPixels: 1e13
});

// End of script